<link rel="stylesheet" href="<?php echo css_url('calendrier' )?>" type="text/css" media="screen" />

<script type ="text/javascript" src="<?php echo js_url('jquery') ?>"></script>
<script type ="text/javascript" src="<?php echo js_url('javascriptFonctions') ?>"></script>
<script type ="text/javascript" src="<?php echo js_url('calendrier') ?>"></script>

<h2>Tableau de bord</h2>
	<h3>Récapitulatif</h3>
	
	<table id="table_tableauDeBord">
		<tr>
			<th colspan="2"><a href="<?php echo base_url();?>index.php/Administration/tableauDeBord/all"><?php echo $allADC + $allForum?> actions de communication</a></th>
		</tr>
		<tr>
		<td>
			<?php
			if($allADC  ==  0)
				echo '0 action';
			elseif ($allADC  ==  1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc"> 1 action</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc"> '.$allADC.' actions</a>';
			?>
		</td>
		<td>
			<?php
			if($allForum  ==  0)
				echo '0 forum';
			elseif ($allForum  ==  1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum"> 1 forum</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum"> '.$allForum.' forums</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($incADC  ==  0)
				echo '0 à compléter';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/incompletes"> '.$incADC.' à compléter</a>';
			?>
		</td>
		<td>
			<?php
			if($incForum  ==  0)
				echo '0 à compléter';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/incomplets"> '.$incForum.' à compléter</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($ouvADC == 0)
				echo '0 ouverte';
			elseif ($ouvADC == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/ouvertes"> 1 ouverte</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/ouvertes"> '.$ouvADC.' ouvertes</a>';
			?>
		</td>
		<td>
			<?php
			if($ouvForum == 0)
				echo '0 ouvert';
			elseif ($ouvForum == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/ouverts"> 1 ouvert</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/ouverts"> '.$ouvForum.' ouverts</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($comADC == 0)
				echo '0 complete';
			elseif ($comADC == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/completes"> 1 complète</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/completes"> '.$comADC.' complètes</a>';
			?>
		</td>
		<td>
			<?php
			if($comForum == 0)
				echo '0 complet';
			elseif ($comForum == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/complet"> 1 complet</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/complets"> '.$comForum.' complets</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($cloADC == 0)
				echo '0 inscriptions closes';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/closes"> '.$cloADC.' inscriptions closes</a>';
			?>
		</td>
		<td>
			<?php
			if($cloForum == 0)
				echo '0 inscriptions closes';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/clos"> '.$cloForum.' inscriptions closes</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($notADC == 0)
				echo '0 à noter';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/anoter"> '.$notADC.' à noter</a>';
			?>
		</td>
		<td>
			<?php
			if($notForum == 0)
				echo '0 à noter';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/anoter"> '.$notForum.' à noter</a>';
			?>
		</td>
		</tr>
		<tr>
		<td>
			<?php
			if($terADC == 0)
				echo '0 terminée';
			elseif ($terADC == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/terminees"> 1 terminée</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/adc/terminees"> '.$terADC.' terminées</a>';
			?>
		</td>
		<td>
			<?php
			if($terForum == 0)
				echo '0 terminé';
			elseif ($terForum == 1)
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/termines"> 1 terminé</a>';
			else
				echo '<a href="'.base_url().'index.php/Administration/tableauDeBord/forum/termines"> '.$terForum.' terminés</a>';
			?>
		</td>
		</tr>
	</table>
	<?php 
		echo '<div class="boutons">
				<ul><li><a href="'.base_url().'index.php/Administration/creerAction"><button type="button">Ajouter une action</button></a></li></ul>
			</div><hr/>';
	?>
	<br/>
	<form action="<?php echo base_url();?>index.php/Administration/tableauDeBord" method="post" >
		<h3>Actions avant le <?php echo date_format($dateAction, 'd/m/Y') ?></h3>
		<label for="dateA">Choisissez une date butoir : </label>
		<input size=20 type="text" name="dateAction" value="<?php echo date_format($dateAction, 'd/m/Y') ?>" min="<?php echo $dateJour?>" placeholder="jj/mm/aaaa" class="calendrier""/>
		<input type="submit" name="AfficherADC" value="Afficher"/>
		<?php echo $erreurDateAction ?>
	</form>
	<br/>
	
	<?php 
		$actions = $actionsDate;
		include view_chemin('ActionsDeCommunication/v_tableActions','php'); 
	?>
	
	<br/><hr/>
	<br/>
	<form action="<?php echo base_url();?>index.php/Administration/tableauDeBord" method="post" >
		<h3>Forums avant le <?php echo date_format($dateForum, 'd/m/Y') ?></h3>
		<label for="dateF">Choisissez une date butoir : </label>
		<input size=20 type="text" name="dateForum" value="<?php echo date_format($dateForum, 'd/m/Y') ?>" min="<?php echo $dateJour?>"  placeholder="jj/mm/aaaa" class="calendrier"/>		
		<input type="submit" name="AfficherForum" value="Afficher"/>
		<?php echo $erreurDateForum ?>
	</form>
	<br/>
	
	<?php 
		$forums = $forumsDate;
		include view_chemin('Forums/v_tableForum','php'); 
	?>
	
	<br/><hr/>
	<br/>
	<h3>Actions proposées</h3>
	<?php 
		$actions = $actionsPropose;
		include view_chemin('ActionsDeCommunication/v_tableActions','php'); 
	?>
	<br/>
	<div class="boutons">
		<ul><li><a href="<?php echo base_url();?>index.php/Administration/parametre"><button type="button">Paramètres</button></a></li></ul>
	</div>